<template>
  <div>
    <van-nav-bar fixed placeholder left-text="返回" left-arrow @click-left="onClickLeft">
      <template #right>
        <van-search placeholder="请输入搜索关键词" v-model="value" @click="gotoSearch" />
      </template>
    </van-nav-bar>
  </div>
</template>
<script>
export default {
  data() {
    return { value: "" };
  },
  methods: {
    onClickLeft() {
      this.$router.go(-1);
    },
    gotoSearch() {
      this.$router.push("/Search");
      this.value = this.$store.state.search.goodsName;
    },
  },
};
</script>
<style lang="scss" scoped></style>
